package com.netty.demo;

import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.nio.file.StandardCopyOption;

/**
 * @Auther: Admin
 * @Date: 2021/4/14 12:48
 * @Description:
 */
public class TestPathsAndFiles {


    public static void main(String[] args) throws IOException {

        Path path = Paths.get("data.txt");
        System.out.println(path.normalize());
        System.out.println(Files.exists(path));

        Path to = Paths.get("data_copy.txt");
        Files.copy(path, to, StandardCopyOption.REPLACE_EXISTING );

        Files.createDirectories(Paths.get("d://test//data.txt"));
        Files.delete(Paths.get("d://test//data.txt"));


    }


}
